package com.guangjian.asc.product.domain;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity
public class Product {

	@NotNull
	@Column(unique = true)
	private String name;

	@NotNull
	@ManyToOne(fetch = FetchType.LAZY)
	private ProductType productType;

	private BigDecimal defaultPrice;

	private String unit;
}
